<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/jquery/2.1.0/jquery.min.js"></script>
    <script type="text/javascript">
        function crosRequest(){
            $.ajax({
                url:'http://localhost:8082/unicom/login',
                type:'post',
                beforeSend:function (xhr){
                    xhr.withCredentials=true;
                },
                dataType:'json',
                contentType: "application/json; charset=UTF-8",
                data: JSON.stringify({
                    username:"10000",
                    password:"804cf166e5ed0d254ddfe00edf51ea9b",
                    loginType:1,
                    rememberMe:1,
                }),
                success:function(data){
                    console.log(data);
                }
            });
        }
    </script>
</head>
<body>
<button onclick="crosRequest()">请求跨域资源</button>
</body>
</html>